<?php	
include "../../functions.php";
include "../../smarty/Smarty.class.php";
$smarty = new Smarty();
//模板目录
$smarty->template_dir = "view";
//编译目录
$smarty->compile_dir = "temp/compile";
//缓存目录
$smarty->cache_dir = "temp/cache";
//开启缓存
$smarty->caching = true;
//缓存时间
$smarty->cache_lifetime = 10;
//清楚缓存
//$smarty->clear_cache();
//左定界符
$smarty->left_delimiter = "{";
//右定界符
$smarty->right_delimiter = "}";
//如果缓存失效
$time = time();
//如果缓存失效，重新获取数据
if(!$smarty->is_cached("head.html")){
	$smarty->assign("time",$time);
}
$smarty->assign("time",$time);

//注册块状标签，固定写法
//参数：html页面标签，函数的名称
$smarty->register_block("nocache","nocache",false);
function nocache($params, $content, &$smarty){
	return $content;
}



$smarty->display("head.html");
















